package com.bwda.dsrs.systemservice.domain.form.gtasks;

import com.bwda.dsrs.base.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
/**
 * 待办任务更新表单
 *
 * @author yanyuemei
 * @date 2019/4/27
 */
@Data
@ApiModel
public class GtasksUpdateForm {

	@ApiModelProperty(value = "", required = true)
	@NotNull(message = "不能为空")
	private Integer id;

	@ApiModelProperty(value = "标题")
	private String jtbdTitle;

	@ApiModelProperty(value = "内容")
	private String content;

	@ApiModelProperty(value = "连接")
	private String url;

	@ApiModelProperty(value = "创建时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date createTime;

	@ApiModelProperty(value = "是否处理")
	private String handleflag;

	@ApiModelProperty(value = "处理时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date handleTime;

	@ApiModelProperty(value = "最终处理时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date finalTime;

	@ApiModelProperty(value = "待办人")
	private String factorCode;

	@ApiModelProperty(value = "发起人")
	private String promoterCode;

	@ApiModelProperty(value = "是否阅读")
	private String readFlag;

	@ApiModelProperty(value = "阅读时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date readTime;

	public Date getCreateTime() {
		if (createTime != null){
			return (Date) createTime.clone();
		}

		return null;
	}

	public void setCreateTime(Date createTime) {
		if (createTime != null){
			this.createTime = (Date) createTime.clone();
		}
	}

	public Date getHandleTime() {
		if (handleTime != null){
			return (Date) handleTime.clone();
		}

		return null;
	}

	public void setHandleTime(Date handleTime) {
		if (handleTime != null){
			this.handleTime = (Date) handleTime.clone();
		}
	}

	public Date getFinalTime() {
		if (finalTime != null){
			return (Date) finalTime.clone();
		}

		return null;
	}

	public void setFinalTime(Date finalTime) {
		if (finalTime != null){
			this.finalTime = (Date) finalTime.clone();
		}
	}

	public Date getReadTime() {
		if (readTime != null){
			return (Date) readTime.clone();
		}

		return null;
	}

	public void setReadTime(Date readTime) {
		if (readTime != null){
			this.readTime = (Date) readTime.clone();
		}
	}
}